package com.shark.uh.model.dto.roles;

import com.shark.uh.model.query.role.RoleQuery;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class RolesSelectDTO {

    public RolesSelectDTO(RoleQuery query) {
        BeanUtils.copyProperties(query, this);
        this.offset = (query.getPageNo() -1) * query.getPageSize();
    }

    private String roleName;
    private Long createdBy;
    private int offset;
    private int pageSize;
}
